package com.xueyi.aixihu.pattern;

import com.xueyi.aixihu.constant.AuditConstant;
import com.xueyi.aixihu.constant.OneLevelAuditConstant;
import com.xueyi.aixihu.constant.SystemRoleAuditAreaEnum;
import com.xueyi.aixihu.constant.SystemRoleConstant;
import com.xueyi.aixihu.entity.po.DtNews;
import com.xueyi.aixihu.entity.vo.DtNewsVo;
import com.xueyi.aixihu.entity.vo.DtUsersVo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 描述 角色策略接口
 *
 * @author 刘梓江
 */
public interface CheckOperationArticleRoleStrategy {


    //获取文章详情的按钮信息
    default Map<String, Integer> detailBtn(DtNewsVo dtNewsVo) {
        Map<String, Integer> btn = new HashMap<>();
        btn.put("isSubmit", 0);
        btn.put("isSave", 0);
        btn.put("isDel", 0);
        btn.put("isCaoGao", 0);
        btn.put("isSuccess", 0);
        btn.put("isTurn", 0);
        btn.put("isPublic", 0);
        return btn;
    }

    //查询审核内容角色校验
    default boolean auditSelect(Integer roleId) {
        return false;
    }

    //查询自己内容角色校验
    default boolean commonSelect(Integer roleId) {
        return false;
    }

    //编辑（增加、修改、删除）角色校验
    default boolean edit(Integer roleId) {
        return false;
    }

    //提交角色校验
    default boolean submit(Integer roleId) {
        return false;
    }

    //1级审核角色校验
    default boolean oneLevelAudit(Integer roleId) {
        return false;
    }

    default String oneLevelAuditMemberInfo(Integer systemId, List<Integer> roleIds) {
        return "";
    }

    //发布角色校验
    default boolean release(Integer roleId) {
        return false;
    }

    int roleAuditType();
}

//镇级党务角色策略
class ZJDWRoleStrategy implements CheckOperationArticleRoleStrategy {

    private ZJDWRoleStrategy() {
    }

    private static final ZJDWRoleStrategy instance = new ZJDWRoleStrategy();

    public static ZJDWRoleStrategy getInstance() {
        return instance;
    }

    public Map<String, Integer> detailBtn(DtNewsVo dtNews) {
        //获取当前登陆用户的信息
        DtUsersVo dtUsersVo = DtUsersVo.findCurrentUser();
        //获取用户的角色
        Integer userMaxRole = dtUsersVo.findUserMaxRole();
        Map<String, Integer> btn = new HashMap<>();
        btn.put("isSubmit", 0);
        btn.put("isSave", 0);
        btn.put("isDel", 0);
        btn.put("isCaoGao", 0);
        btn.put("isSuccess", 0);
        btn.put("isTurn", 0);
        btn.put("isPublic", 0);
        if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.DRAFT)) {
            if (userMaxRole.equals(SystemRoleConstant.Z_DJB_CY)) {
                btn.put("isSubmit", 1);
                btn.put("isSave", 1);
                btn.put("isDel", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.SUBMIT_AUDIT)) {
            if (userMaxRole.equals(SystemRoleConstant.Z_DJB_ZR)) {
                btn.put("isSuccess", 1);
                btn.put("isTurn", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.CONSENT)) {
            if (userMaxRole.equals(SystemRoleConstant.Z_DJB_ZR)) {
                btn.put("isPublic", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.FAIL)) {
            if (userMaxRole.equals(SystemRoleConstant.Z_DJB_CY)) {
                btn.put("isCaoGao", 1);
            }
        }
        return btn;
    }

    public boolean auditSelect(Integer roleId) {
        if (SystemRoleConstant.Z_DJB_ZR.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean commonSelect(Integer roleId) {
        if (SystemRoleConstant.Z_DJB_CY.equals(roleId) || SystemRoleConstant.Z_DJB_ZR.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean edit(Integer roleId) {
        if (SystemRoleConstant.Z_DJB_CY.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean submit(Integer roleId) {
        if (SystemRoleConstant.Z_DJB_CY.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean oneLevelAudit(Integer roleId) {
        if (SystemRoleConstant.Z_DJB_ZR.equals(roleId)) {
            return true;
        }
        return false;
    }

    public String oneLevelAuditMemberInfo(Integer systemId, List<Integer> roleIds) {
        return SystemRoleAuditAreaEnum.getSystemTypeAuditName(systemId,roleIds);
    }

    public boolean release(Integer roleId) {
        if (SystemRoleConstant.Z_DJB_ZR.equals(roleId)) {
            return true;
        }
        return false;
    }

    @Override
    public int roleAuditType() {
        return AuditConstant.WZ_ZJ_DW_AUDIT;
    }
}

//镇级政务角色策略
class ZJZWRoleStrategy implements CheckOperationArticleRoleStrategy {

    private ZJZWRoleStrategy() {
    }

    private static final ZJZWRoleStrategy instance = new ZJZWRoleStrategy();

    public static ZJZWRoleStrategy getInstance() {
        return instance;
    }

    public Map<String, Integer> detailBtn(DtNewsVo dtNews) {
        //获取当前登陆用户的信息
        DtUsersVo dtUsersVo = DtUsersVo.findCurrentUser();
        //获取用户的角色
        Integer userMaxRole = dtUsersVo.findUserMaxRole();
        Map<String, Integer> btn = new HashMap<>();
        btn.put("isSubmit", 0);
        btn.put("isSave", 0);
        btn.put("isDel", 0);
        btn.put("isCaoGao", 0);
        btn.put("isSuccess", 0);
        btn.put("isTurn", 0);
        btn.put("isPublic", 0);
        if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.DRAFT)) {
            if (SystemRoleConstant.Z_MZB_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NF_A_ZB_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_GG_ZY_JY_ZX_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_ZS_XM_B_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NY_FW_ZX_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_LB_S_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_JGZ_CY.equals(userMaxRole)) {
                btn.put("isSubmit", 1);
                btn.put("isSave", 1);
                btn.put("isDel", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.SUBMIT_AUDIT)) {
            if (
                    SystemRoleConstant.Z_MZB_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NF_A_ZB_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_GG_ZY_JY_ZX_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_ZS_XM_B_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NY_FW_ZX_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_LB_S_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_JGZ_ZZ.equals(userMaxRole)
                 ) {
                btn.put("isSuccess", 1);
                btn.put("isTurn", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.CONSENT)) {
            if (SystemRoleConstant.Z_MZB_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NF_A_ZB_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_GG_ZY_JY_ZX_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_ZS_XM_B_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NY_FW_ZX_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_LB_S_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_JGZ_ZZ.equals(userMaxRole)) {
                btn.put("isPublic", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.FAIL)) {
            if (SystemRoleConstant.Z_MZB_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NF_A_ZB_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_GG_ZY_JY_ZX_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_ZS_XM_B_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NY_FW_ZX_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_LB_S_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_JGZ_CY.equals(userMaxRole)) {
                btn.put("isCaoGao", 1);
            }
        }
        return btn;
    }


    public boolean auditSelect(Integer roleId) {
        if (
                SystemRoleConstant.Z_MZB_ZR.equals(roleId) ||
                SystemRoleConstant.Z_NF_A_ZB_ZR.equals(roleId) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_ZR.equals(roleId) ||
                SystemRoleConstant.Z_ZS_XM_B_ZR.equals(roleId) ||
                SystemRoleConstant.Z_NY_FW_ZX_ZR.equals(roleId) ||
                SystemRoleConstant.Z_LB_S_ZR.equals(roleId) ||
                SystemRoleConstant.Z_JGZ_ZZ.equals(roleId)

        ) {
            return true;
        }
        return false;
    }

    public boolean commonSelect(Integer roleId) {
        if (
                SystemRoleConstant.Z_MZB_CY.equals(roleId) ||
                SystemRoleConstant.Z_NF_A_ZB_CY.equals(roleId) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_CY.equals(roleId) ||
                SystemRoleConstant.Z_ZS_XM_B_CY.equals(roleId) ||
                SystemRoleConstant.Z_NY_FW_ZX_CY.equals(roleId)||
                SystemRoleConstant.Z_LB_S_CY.equals(roleId) ||
                SystemRoleConstant.Z_JGZ_CY.equals(roleId) ||

                SystemRoleConstant.Z_MZB_ZR.equals(roleId) ||
                SystemRoleConstant.Z_NF_A_ZB_ZR.equals(roleId) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_ZR.equals(roleId) ||
                SystemRoleConstant.Z_ZS_XM_B_ZR.equals(roleId) ||
                SystemRoleConstant.Z_NY_FW_ZX_ZR.equals(roleId)||
                SystemRoleConstant.Z_LB_S_ZR.equals(roleId)||
                SystemRoleConstant.Z_JGZ_ZZ.equals(roleId)
        ) {
            return true;
        }
        return false;
    }

    public boolean edit(Integer roleId) {
        if (SystemRoleConstant.Z_MZB_CY.equals(roleId) ||
                SystemRoleConstant.Z_NF_A_ZB_CY.equals(roleId) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_CY.equals(roleId) ||
                SystemRoleConstant.Z_ZS_XM_B_CY.equals(roleId) ||
                SystemRoleConstant.Z_NY_FW_ZX_CY.equals(roleId)||
                SystemRoleConstant.Z_LB_S_CY.equals(roleId)||
                SystemRoleConstant.Z_JGZ_CY.equals(roleId) ) {
            return true;
        }
        return false;
    }

    public boolean submit(Integer roleId) {
        if (SystemRoleConstant.Z_MZB_CY.equals(roleId) ||
                SystemRoleConstant.Z_NF_A_ZB_CY.equals(roleId) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_CY.equals(roleId) ||
                SystemRoleConstant.Z_ZS_XM_B_CY.equals(roleId) ||
                SystemRoleConstant.Z_NY_FW_ZX_CY.equals(roleId)||
                SystemRoleConstant.Z_LB_S_CY.equals(roleId)||
                SystemRoleConstant.Z_JGZ_CY.equals(roleId) ) {
            return true;
        }
        return false;
    }

    public boolean oneLevelAudit(Integer roleId) {
        if (
                SystemRoleConstant.Z_MZB_ZR.equals(roleId) ||
                SystemRoleConstant.Z_NF_A_ZB_ZR.equals(roleId) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_ZR.equals(roleId) ||
                SystemRoleConstant.Z_ZS_XM_B_ZR.equals(roleId) ||
                SystemRoleConstant.Z_NY_FW_ZX_ZR.equals(roleId) ||
                SystemRoleConstant.Z_LB_S_ZR.equals(roleId) ||
                SystemRoleConstant.Z_JGZ_ZZ.equals(roleId)
        ) {
            return true;
        }
        return  false;
    }

    public String oneLevelAuditMemberInfo(Integer systemId, List<Integer> roleIds) {
        return SystemRoleAuditAreaEnum.getSystemTypeAuditName(systemId,roleIds);

    }

    public boolean release(Integer roleId) {
        if (SystemRoleConstant.Z_MZB_ZR.equals(roleId) ||
                SystemRoleConstant.Z_NF_A_ZB_ZR.equals(roleId) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_ZR.equals(roleId) ||
                SystemRoleConstant.Z_ZS_XM_B_ZR.equals(roleId) ||
                SystemRoleConstant.Z_NY_FW_ZX_ZR.equals(roleId) ||
                SystemRoleConstant.Z_LB_S_ZR.equals(roleId) ||
                SystemRoleConstant.Z_JGZ_ZZ.equals(roleId)) {
            return true;
        }
        return false;
    }

    @Override
    public int roleAuditType() {
        return AuditConstant.WZ_ZJ_ZW_AUDIT;
    }
}

//村级党务角色策略
class CJDWRoleStrategy implements CheckOperationArticleRoleStrategy {

    private CJDWRoleStrategy() {
    }

    private static final CJDWRoleStrategy instance = new CJDWRoleStrategy();

    public static CJDWRoleStrategy getInstance() {
        return instance;
    }

    public Map<String, Integer> detailBtn(DtNewsVo dtNews) {
        //获取当前登陆用户的信息
        DtUsersVo dtUsersVo = DtUsersVo.findCurrentUser();
        //获取用户的角色
        Integer userMaxRole = dtUsersVo.findUserMaxRole();
        Map<String, Integer> btn = new HashMap<>();
        btn.put("isSubmit", 0);
        btn.put("isSave", 0);
        btn.put("isDel", 0);
        btn.put("isCaoGao", 0);
        btn.put("isSuccess", 0);
        btn.put("isTurn", 0);
        btn.put("isPublic", 0);
        if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.DRAFT)) {
            if (SystemRoleConstant.CUN.equals(userMaxRole) || SystemRoleConstant.SQ.equals(userMaxRole) || SystemRoleConstant.JU_WEI.equals(userMaxRole)) {
                btn.put("isSubmit", 1);
                btn.put("isSave", 1);
                btn.put("isDel", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.SUBMIT_AUDIT)) {
            if (SystemRoleConstant.Z_DJB_CY.equals(userMaxRole) || SystemRoleConstant.Z_DJB_ZR.equals(userMaxRole)) {
                btn.put("isSuccess", 1);
                btn.put("isTurn", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.CONSENT)) {
            if (SystemRoleConstant.CUN.equals(userMaxRole) || SystemRoleConstant.SQ.equals(userMaxRole) || SystemRoleConstant.JU_WEI.equals(userMaxRole)) {
                btn.put("isPublic", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.FAIL)) {
            if (SystemRoleConstant.CUN.equals(userMaxRole) || SystemRoleConstant.SQ.equals(userMaxRole) || SystemRoleConstant.JU_WEI.equals(userMaxRole)) {
                btn.put("isCaoGao", 1);
            }
        }
        return btn;
    }

    public boolean auditSelect(Integer roleId) {
        if (SystemRoleConstant.Z_DJB_ZR.equals(roleId) || SystemRoleConstant.Z_DJB_CY.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean commonSelect(Integer roleId) {
        if (SystemRoleConstant.CUN.equals(roleId) || SystemRoleConstant.SQ.equals(roleId) || SystemRoleConstant.JU_WEI.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean edit(Integer roleId) {
        if (SystemRoleConstant.CUN.equals(roleId) || SystemRoleConstant.SQ.equals(roleId) || SystemRoleConstant.JU_WEI.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean submit(Integer roleId) {
        if (SystemRoleConstant.CUN.equals(roleId) || SystemRoleConstant.SQ.equals(roleId) || SystemRoleConstant.JU_WEI.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean oneLevelAudit(Integer roleId) {
        if (SystemRoleConstant.Z_DJB_CY.equals(roleId) || SystemRoleConstant.Z_DJB_ZR.equals(roleId)) {
            return true;
        }
        return false;
    }

    public String oneLevelAuditMemberInfo(Integer systemId, List<Integer> roleIds) {
        return "镇党建办";
    }

    public boolean release(Integer roleId) {
        if (SystemRoleConstant.CUN.equals(roleId) || SystemRoleConstant.SQ.equals(roleId) || SystemRoleConstant.JU_WEI.equals(roleId)) {
            return true;
        }
        return false;
    }

    @Override
    public int roleAuditType() {
        return AuditConstant.WZ_CJ_DW_AUDIT;
    }
}

//村级村务角色策略
class CJZWRoleStrategy implements CheckOperationArticleRoleStrategy {

    private CJZWRoleStrategy() {
    }

    private static final CJZWRoleStrategy instance = new CJZWRoleStrategy();

    public static CJZWRoleStrategy getInstance() {
        return instance;
    }

    public Map<String, Integer> detailBtn(DtNewsVo dtNews) {
        //获取当前登陆用户的信息
        DtUsersVo dtUsersVo = DtUsersVo.findCurrentUser();
        //获取用户的角色
        Integer userMaxRole = dtUsersVo.findUserMaxRole();
        Map<String, Integer> btn = new HashMap<>();
        btn.put("isSubmit", 0);
        btn.put("isSave", 0);
        btn.put("isDel", 0);
        btn.put("isCaoGao", 0);
        btn.put("isSuccess", 0);
        btn.put("isTurn", 0);
        btn.put("isPublic", 0);
        if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.DRAFT)) {
            if (SystemRoleConstant.CUN.equals(userMaxRole) || SystemRoleConstant.SQ.equals(userMaxRole) || SystemRoleConstant.JU_WEI.equals(userMaxRole)) {
                btn.put("isSubmit", 1);
                btn.put("isSave", 1);
                btn.put("isDel", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.SUBMIT_AUDIT)) {
            if (    SystemRoleConstant.Z_MZB_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NF_A_ZB_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_GG_ZY_JY_ZX_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_ZS_XM_B_CY.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NY_FW_ZX_CY.equals(userMaxRole)||

                    SystemRoleConstant.Z_MZB_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NF_A_ZB_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_GG_ZY_JY_ZX_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_ZS_XM_B_ZR.equals(userMaxRole) ||
                    SystemRoleConstant.Z_NY_FW_ZX_ZR.equals(userMaxRole)||

                    SystemRoleConstant.Z_JGZ_CY.equals(userMaxRole)||
                    SystemRoleConstant.Z_JGZ_ZZ.equals(userMaxRole)||
                    SystemRoleConstant.Z_DJB_CY.equals(userMaxRole)||
                    SystemRoleConstant.Z_DJB_ZR.equals(userMaxRole)
            ) {
                btn.put("isSuccess", 1);
                btn.put("isTurn", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.CONSENT)) {
            if (SystemRoleConstant.CUN.equals(userMaxRole) || SystemRoleConstant.SQ.equals(userMaxRole) || SystemRoleConstant.JU_WEI.equals(userMaxRole)) {
                btn.put("isPublic", 1);
            }
        } else if (dtNews.getAuditStatus().equals(OneLevelAuditConstant.FAIL)) {
            if (SystemRoleConstant.CUN.equals(userMaxRole) || SystemRoleConstant.SQ.equals(userMaxRole) || SystemRoleConstant.JU_WEI.equals(userMaxRole)) {
                btn.put("isCaoGao", 1);
            }
        }
        return btn;
    }

    public boolean auditSelect(Integer roleId) {
        if (
                SystemRoleConstant.Z_MZB_CY.equals(roleId) ||
                SystemRoleConstant.Z_NF_A_ZB_CY.equals(roleId) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_CY.equals(roleId) ||
                SystemRoleConstant.Z_ZS_XM_B_CY.equals(roleId) ||
                SystemRoleConstant.Z_NY_FW_ZX_CY.equals(roleId)||

                SystemRoleConstant.Z_MZB_ZR.equals(roleId) ||
                SystemRoleConstant.Z_NF_A_ZB_ZR.equals(roleId) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_ZR.equals(roleId) ||
                SystemRoleConstant.Z_ZS_XM_B_ZR.equals(roleId) ||
                SystemRoleConstant.Z_NY_FW_ZX_ZR.equals(roleId)||

                SystemRoleConstant.Z_JGZ_ZZ.equals(roleId) ||
                SystemRoleConstant.Z_JGZ_CY.equals(roleId) ||
                SystemRoleConstant.Z_DJB_CY.equals(roleId) ||
                SystemRoleConstant.Z_DJB_ZR.equals(roleId)
        ) {
            return true;
        }
        return false;
    }

    public boolean commonSelect(Integer roleId) {
        if (SystemRoleConstant.CUN.equals(roleId) || SystemRoleConstant.SQ.equals(roleId) || SystemRoleConstant.JU_WEI.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean edit(Integer roleId) {
        if (SystemRoleConstant.CUN.equals(roleId) || SystemRoleConstant.SQ.equals(roleId) || SystemRoleConstant.JU_WEI.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean submit(Integer roleId) {
        if (SystemRoleConstant.CUN.equals(roleId) || SystemRoleConstant.SQ.equals(roleId) || SystemRoleConstant.JU_WEI.equals(roleId)) {
            return true;
        }
        return false;
    }

    public boolean oneLevelAudit(Integer userMaxRole) {
        if (
                SystemRoleConstant.Z_MZB_CY.equals(userMaxRole) ||
                SystemRoleConstant.Z_NF_A_ZB_CY.equals(userMaxRole) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_CY.equals(userMaxRole) ||
                SystemRoleConstant.Z_ZS_XM_B_CY.equals(userMaxRole) ||
                SystemRoleConstant.Z_NY_FW_ZX_CY.equals(userMaxRole)||

                SystemRoleConstant.Z_MZB_ZR.equals(userMaxRole) ||
                SystemRoleConstant.Z_NF_A_ZB_ZR.equals(userMaxRole) ||
                SystemRoleConstant.Z_GG_ZY_JY_ZX_ZR.equals(userMaxRole) ||
                SystemRoleConstant.Z_ZS_XM_B_ZR.equals(userMaxRole) ||
                SystemRoleConstant.Z_NY_FW_ZX_ZR.equals(userMaxRole)||

                SystemRoleConstant.Z_JGZ_CY.equals(userMaxRole)||
                SystemRoleConstant.Z_JGZ_ZZ.equals(userMaxRole)||
                SystemRoleConstant.Z_DJB_CY.equals(userMaxRole)||
                SystemRoleConstant.Z_DJB_ZR.equals(userMaxRole)
               ) {
            return true;
        }
        return false;
    }

    public String oneLevelAuditMemberInfo(Integer systemId, List<Integer> roleIds) {
        return SystemRoleAuditAreaEnum.getSystemTypeAuditName(systemId,roleIds);
    }

    public boolean release(Integer roleId) {
        if (SystemRoleConstant.CUN.equals(roleId) || SystemRoleConstant.SQ.equals(roleId) || SystemRoleConstant.JU_WEI.equals(roleId)) {
            return true;
        }
        return false;
    }


    @Override
    public int roleAuditType() {
        return AuditConstant.WZ_CJ_CW_AUDIT;
    }
}

